package cn.vendcommon.com.entity.enums;

public enum ErrorCode {
    // 公共错误
    SYSTEM_ERROR(1000, "系统异常"),
    PARAM_ERROR(1001, "参数错误"),
    UNAUTHORIZED(1002, "未授权"),

    // 用户相关
    USER_NOT_FOUND(2001, "用户不存在"),
    BALANCE_NOT_ENOUGH(2002, "余额不足"),
    RECHARGE_AMOUNT_INVALID(2003, "充值金额必须大于0");

    private final int code;
    private final String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
